window.onload = function() {
	seajs.use(['jquery-1.8.2.js', 'iscroll_module.js', 'mdialog_module.js', 'util_module.js', 'imgUpload_module.js', ], function(Z, I, M, U, IMG) {
		var user = U.checkLogin();
		var user_typ=U.getParam('typ');
		U.fillHead();
		U.fillTree();
		U.fillFooter();
		var contentHeight = document.body.scrollHeight;//网页正文全文高度
		var winHeight = window.innerHeight;

		if(contentHeight<winHeight){
			contentHeight=winHeight;
		}
		$(".body-list").css("height",(contentHeight-362)+"px");
		initPage();

		function initPage() { //初始化页面
			U.loadOpt(false);
			U.ajaxget("/poverty/getByUser/"+user.info.id , "", function(list) {
				if(list.success) {
					U.ajaxget("/donation/donationList" , {provinceId:list.models.povertyObjVO.id}, function(json) {
						if(json.success) {
							$(".help-list-info>div").empty();
							$(json.models.donationList).each(function(i) {
								var item="<div style='width: 90%; margin-top: 27px'><div><span style='display: block;width: 10px;height: 10px;background-color: #DEDEDE;float: left;margin-top: 5px'></span><span style='display: block;margin-left: 20px'>"+U.getMyDate(this.gmtModify)+"</span></div><div style='margin-top: 17px'><span style='clear: left;display: block;margin-left: 20px'>"+this.content+"</span></div></div>"
								$(".help-list-info").append(item);
							});
						} else {
							M.toast(false, json.errorMsg);
						}
					})
				} else {
					M.toast(false, json.errorMsg);
				}
			})

		}

	});
}